url = '/account/wishlist.html'
description = '愿望清单'
layout = 'default-x'

[session]
security = "user"
redirect = "account/login"
==
{% put page_title %}Wishlist - {% default %}{% endput %}
{% set wishlists = catalog.getWishlists %}
<!-- contents -->
<div id="contents">
  <nav class="crumbs_nav">
    <ul class="crumbs_list rdstr">
      <li class="crumbs_item">
        <a class="crumbs_link" href="/">
          <span>ホーム</span>
        </a>
      </li>
      <li class="crumbs_item">
        <a class="crumbs_link" href="{{ 'account/dashboard'|page }}">
          <span>マイページトップ</span>
        </a>
      </li>
      <li class="crumbs_item no_deco">
        <span class="crumbs_link">お気に入り</span>
      </li>
    </ul>
  </nav>
  <h3 class="title_main">お気に入り</h3>
  <section class="mb20">
    <div class="tab_liquid">
      <ul class="box_list">
        <li>
          <span class="tab_liquid_list_inner">アイテム</span>
        </li>
      </ul>
    </div>
    <section>
      <section>
        {% if count(wishlists)>0 %}
          <ul class="list_product_line list_product_line_checkbox clearfix mt0">
            {% for wilt in wishlists %}
            <li class="list_product_item" style="{% if wilt.product.status != 'instock' %} background: #ddd;{% endif %}">
              <div class="box_list">
                <div class="list_product_link box_list_main">
                  <div class="list_product_frame">
                    <div class="list_product_img_block">
                      <img src="{{ wilt.product.getMainThumb(67,90)}}">
                    </div>
                    <div class="list_product_text_block">
                      <a class="db" {% if wilt.product.status == 'instock' %} href="{{ wilt.product.url }}" {% endif %} >
                        <p class="list_product_name">{{wilt.product.name}}</p>
                        <p class="list_product_price_block rdstr pricedownView list_product_box">
                          <span class="list_product_price force_color">{{ wilt.product.price|formatPrice }}</span>
                          {% if wilt.product.status != 'instock' %}
                          <strong><span>在庫切れ</span></strong>
                          {% endif %}
                        </p>
                      </a>
                    </div>
                    <span class="arrow"></span>
                  </div>
                  
                  <a class="btn_delete" href="#" data-request="onDeleteWish"
                           data-request-confirm="削除を確認しますか？"
                           data-request-data="wish_id: {{ wilt.id }}" 
                           data-request-success="afterDeleteWish(this, data)">
                       <span class="icon_wrap">
                        <span class="icon_img i_common_cart sprite-trash_g"></span>
                        <span class="icon_txt">削除</span>
                      </span>
                   </a>
                </div>
              </div>
            </li>
            {% endfor %}
          </ul>
        <p class="sub_color tac m10 mb20">※お気に入りアイテム登録数は1000件まで。</p>
      </section>
      {% else %}
          <p style="padding:20px;">お気に入り登録はまだありません。<br>今すぐ検索してお好きな商品を追加しましょう！</p>
      {% endif %}
    </section>
  </section>
</div>
<!-- end contents -->
    